import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';

const routeName = 'course';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/course',
    name: routeName,
    redirect: '/course/account',
    component: Layout,
    meta: {
      title: '课程资源',
      sort: 1,
    },
    children: [
      {
        path: 'major',
        name: `${routeName}_major_0`,
        meta: {
          title: 'AI专业课程',
        },
        component: () => import('@/views/course/major.vue'),
      },
      {
        path: 'vocation',
        name: `${routeName}_vocation_1`,
        meta: {
          title: 'AI职业课程',
        },
        component: () => import('@/views/course/major.vue'),
      },
      {
        path: 'empowerment',
        name: `${routeName}_empowerment_2`,
        meta: {
          title: 'AI赋能课程',
        },
        component: () => import('@/views/course/major.vue'),
      },
      {
        path: 'guideline',
        name: `${routeName}_guideline_3`,
        meta: {
          title: 'AI应用指南',
        },
        component: () => import('@/views/course/major.vue'),
      },
      {
        path: 'case',
        name: `${routeName}_case_4`,
        meta: {
          title: 'AI应用案例',
        },
        component: () => import('@/views/course/major.vue'),
      },
      {
        path: 'tools',
        name: `${routeName}_tools_5`,
        meta: {
          title: 'AI应用工具',
        },
        component: () => import('@/views/course/major.vue'),
      },
    ],
  },
];

export default routes;
